For example, in accordance with an international standard video encoding method, such as MPEG (Moving Picture Experts Group) or “ITU-T H.26x”, an inputted video frame is divided into rectangular blocks (encoding target blocks), a prediction process using an already-encoded image signal is carried out on each encoding target block to generate a prediction image, and orthogonal transformation and a quantization process is carried out on a prediction error signal which is the difference between the encoding target block and the prediction image in units of a block, so that information compression is carried out on the inputted video frame.
For example, in the case of MPEG-4 AVC/H.264 (ISO/IEC 14496-10|TU-T H.264) which is an international standard method, an intra prediction process from already-encoded adjacent pixels or a motion-compensated prediction process between adjacent frames is carried out (for example, refer to nonpatent reference 1). In the case of MPEG-4 AVC/H.264, one prediction mode can be selected from a plurality of prediction modes for each block in an intra prediction mode of luminance. FIG. 10 is an explanatory drawing showing intra prediction modes in the case of a 4×4 pixel block size for luminance. In FIG. 10, each white circle shows a pixel in a coding block, and each black circle shows a pixel that is used for prediction, and that exists in an already-encoded adjacent block.
In the example shown in FIG. 10, nine modes 0 to 8 are prepared as intra prediction modes, and the mode 2 is the one in which an average prediction is carried out in such a way that each pixel in the target coding block is predicted by using the average of adjacent pixels existing in the upper and left blocks. The modes other than the mode 2 are intra prediction modes in each of which a directional prediction is carried out. The mode 0 is the one in which a vertical prediction is carried out in such a way that adjacent pixels in the upper block are repeatedly replicated to create plural rows of pixels along a vertical direction to generate a prediction image. For example, the mode 0 is selected when the target coding block is a vertically striped pattern. The mode 1 is the one in which a horizontal prediction is carried out in such a way that adjacent pixels in the left block are repeatedly replicated to create plural columns of pixels along a horizontal direction to generate a prediction image. For example, the mode 1 is selected when the target coding block is a horizontally striped pattern. In each of the modes 3 to 8, interpolation pixels running in a predetermined direction (i.e., a direction shown by arrows) are generated by using the adjacent pixels in the upper block or the left block to generate a prediction image.
In this case, the block size for luminance to which an intra prediction is applied can be selected from 4×4 pixels, 8×8 pixels, and 16×16 pixels. In the case of 8×8 pixels, nine intra prediction modes are defined, like in the case of 4×4 pixels. In contrast with this, in the case of 16×16 pixels, four intra prediction modes which are called plane predictions are defined in addition to intra prediction modes associated with an average prediction, a vertical prediction, and a horizontal prediction. Each intra prediction associated with a plane prediction is a mode in which pixels created by carrying out an interpolation in a diagonal direction on the adjacent pixels in the upper block and the adjacent pixels in the left block are provided as predicted values.
In an intra prediction mode in which a directional prediction is carried out, because predicted values are generated along a direction predetermined by the mode, e.g., a direction of 45 degrees, the prediction efficiency increases and the code amount can be reduced when the direction of a boundary (edge) of an object in a block matches the direction shown by the prediction mode. However, a slight displacement may occur between the direction of an edge and the direction shown by the prediction mode, and, even if the direction of an edge in the encoding target block does not match the direction shown by the prediction mode, a large prediction error may occur locally for the simple reason that the edge is slightly distorted (swung, bent, or the like). As a result, the prediction efficiency may drop extremely. In order to prevent such a reduction in the prediction efficiency, when performing an 8×8-pixel directional prediction, a prediction process is carried out to generate a smoothed prediction image by using already-encoded adjacent pixels on which a smoothing process has been carried out, thereby reducing any slight displacement in the prediction direction and prediction errors which occur when a slight distortion occurs in an edge.